gdk: Drop gdk_device_get_history
authorMatthias Clasen <mclasen@redhat.com>
Mon, 8 Jun 2020 22:22:52 +0000 (18:22 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 8 Jun 2020 22:24:20 +0000 (18:24 -0400)
This function is not implemented anywhere.

docs/reference/gdk/gdk4-sections.txt
gdk/gdkdevice.c
gdk/gdkdevice.h
gdk/gdkdeviceprivate.h

index b20bcaf3419bb31d2f5e0e46181025150c797b13..cc1bdd01893f9bd765908021f3fee86e415a2c0f 100644 (file)
@@ -382,8 +382,6 @@ gdk_device_has_bidi_layouts
 <SUBSECTION>
 gdk_device_get_state
 gdk_device_get_surface_at_position
-gdk_device_get_history
-gdk_device_free_history
 GdkTimeCoord
 gdk_device_get_axis
 gdk_device_get_axis_names
index b617423fe9438e0c7d0719eda481af75707c16e2..969d05f777d707238135929355ae679c5a5bdd04 100644 (file)
@@ -635,93 +635,6 @@ gdk_device_get_surface_at_position (GdkDevice *device,
   return surface;
 }
 
-/**
- * gdk_device_get_history: (skip)
- * @device: a #GdkDevice
- * @surface: the surface with respect to which the event coordinates will be reported
- * @start: starting timestamp for range of events to return
- * @stop: ending timestamp for the range of events to return
- * @events: (array length=n_events) (out) (transfer full) (optional):
- *   location to store a newly-allocated array of #GdkTimeCoord, or
- *   %NULL
- * @n_events: (out) (optional): location to store the length of
- *   @events, or %NULL
- *
- * Obtains the motion history for a pointer device; given a starting and
- * ending timestamp, return all events in the motion history for
- * the device in the given range of time. Some windowing systems
- * do not support motion history, in which case, %FALSE will
- * be returned. (This is not distinguishable from the case where
- * motion history is supported and no events were found.)
- *
- * Note that there is also gdk_surface_set_event_compression() to get
- * more motion events delivered directly, independent of the windowing
- * system.
- *
- * Returns: %TRUE if the windowing system supports motion history and
- *  at least one event was found.
- **/
-gboolean
-gdk_device_get_history (GdkDevice      *device,
-                        GdkSurface      *surface,
-                        guint32         start,
-                        guint32         stop,
-                        GdkTimeCoord ***events,
-                        gint           *n_events)
-{
-  g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE);
-  g_return_val_if_fail (device->source != GDK_SOURCE_KEYBOARD, FALSE);
-  g_return_val_if_fail (GDK_IS_SURFACE (surface), FALSE);
-
-  if (n_events)
-    *n_events = 0;
-
-  if (events)
-    *events = NULL;
-
-  if (GDK_SURFACE_DESTROYED (surface))
-    return FALSE;
-
-  if (!GDK_DEVICE_GET_CLASS (device)->get_history)
-    return FALSE;
-
-  return GDK_DEVICE_GET_CLASS (device)->get_history (device, surface,
-                                                     start, stop,
-                                                     events, n_events);
-}
-
-GdkTimeCoord **
-_gdk_device_allocate_history (GdkDevice *device,
-                              gint       n_events)
-{
-  GdkTimeCoord **result = g_new (GdkTimeCoord *, n_events);
-  gint i;
-
-  for (i = 0; i < n_events; i++)
-    result[i] = g_malloc (sizeof (GdkTimeCoord) -
-                          sizeof (double) * (GDK_MAX_TIMECOORD_AXES - device->axes->len));
-  return result;
-}
-
-/**
- * gdk_device_free_history: (skip)
- * @events: (array length=n_events): an array of #GdkTimeCoord.
- * @n_events: the length of the array.
- *
- * Frees an array of #GdkTimeCoord that was returned by gdk_device_get_history().
- */
-void
-gdk_device_free_history (GdkTimeCoord **events,
-                         gint           n_events)
-{
-  gint i;
-
-  for (i = 0; i < n_events; i++)
-    g_free (events[i]);
-
-  g_free (events);
-}
-
 /**
  * gdk_device_get_name:
  * @device: a #GdkDevice
index b1cdf583a44cebf4d71b4b1a40ad302ad84b522b..a45a3163fb8acfd3b62b1b4e0abdb7201749ca7c 100644 (file)
@@ -146,16 +146,6 @@ GDK_AVAILABLE_IN_ALL
 GdkSurface * gdk_device_get_surface_at_position (GdkDevice *device,
                                                  double    *win_x,
                                                  double    *win_y);
-GDK_AVAILABLE_IN_ALL
-gboolean gdk_device_get_history  (GdkDevice         *device,
-                                  GdkSurface         *surface,
-                                  guint32            start,
-                                  guint32            stop,
-                                  GdkTimeCoord    ***events,
-                                  gint              *n_events);
-GDK_AVAILABLE_IN_ALL
-void     gdk_device_free_history (GdkTimeCoord     **events,
-                                  gint               n_events);
 
 GDK_AVAILABLE_IN_ALL
 gint     gdk_device_get_n_axes     (GdkDevice       *device);
index 55d4f0beef0a7be5f4b6e8ea2743b5918244affc..de7c9e5c344bd1279294f8c2d6089b92369acca5 100644 (file)
@@ -70,13 +70,6 @@ struct _GdkDeviceClass
 {
   GObjectClass parent_class;
 
-  gboolean (* get_history)   (GdkDevice      *device,
-                              GdkSurface      *surface,
-                              guint32         start,
-                              guint32         stop,
-                              GdkTimeCoord ***events,
-                              gint           *n_events);
-
   void (* get_state)         (GdkDevice       *device,
                               GdkSurface       *surface,
                               gdouble         *axes,